*************************************************************************************************************************************************  TABLE 2, Additional Balance Check ***************************************************************************************************************************************************************Effect of TT conditional on RR***first TT and RR use "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat RRandTT butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl RRandTT : egen Nschools=count(schoolid)bys girl RRandTT: egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if RRandTT==1, by(girl sampleSD)***then TT and no RR use "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat TTnoRR butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl TTnoRR : egen Nschools=count(schoolid)bys girl TTnoRR: egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if TTnoRR==1, by(girl sampleSD)***Difference between groups - GIRLuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", clearcollapse HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize  sampleSD if HIVtreat==1foreach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' sampleSD if girl==1 & HIVtreat==1}***Difference between groups - BOYuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", clearcollapse HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize  sampleSD if HIVtreat==1foreach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' sampleSD if girl==0 & HIVtreat==1}*******************Effect of RR***first RR but no TT use "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat RRWithoutTT butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl RRWithoutTT : egen Nschools=count(schoolid)bys girl RRWithoutTT: egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if RRWithoutTT==1, by(girl sampleSD)***Then no TT and no RRuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat noRRnoTT butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl noRRnoTT : egen Nschools=count(schoolid)bys girl noRRnoTT: egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if noRRnoTT==1, by(girl sampleSD)***Difference between groups - GIRLuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", clearcollapse HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize  sampleSD if HIVtreat==0foreach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' sampleSD if girl==1 & HIVtreat==0}***Difference between groups - BOYuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", clearcollapse HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize  sampleSD if HIVtreat==0foreach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' sampleSD if girl==0 & HIVtreat==0}************Effect of TT and RR ****first both TT and RR are true***Then no TT and no RRuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat RRandTT butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl RRandTT : egen Nschools=count(schoolid)bys girl RRandTT: egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if RRandTT==1, by(girl sampleSD)***Then no TT and no RRuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat noRRnoTT butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl noRRnoTT : egen Nschools=count(schoolid)bys girl noRRnoTT : egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if noRRnoTT==1, by(girl sampleSD)***NB: to find the differences between these groups, need to generate a dummy variable for HIVtreat and sampleSD ==1use "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1gen RR_TTvneither = .replace RR_TTvneither = 0 if noRRnoTT==1replace RR_TTvneither = 1 if RRandTT==1***Difference between groups - GIRLcollapse RR_TTvneither HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize RR_TTvneitherforeach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' RR_TTvneither if girl==1 }***Difference between groups - BOYuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RR_TTvneither = .replace RR_TTvneither = 0 if HIVtreat==0 & sampleSD==0replace RR_TTvneither = 1 if HIVtreat==1 & sampleSD==1collapse RR_TTvneither HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize RR_TTvneitherforeach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' RR_TTvneither if girl==0 }**Effect of TT*First TT no RRuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat TTnoRR butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl TTnoRR : egen Nschools=count(schoolid)bys girl TTnoRR : egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if TTnoRR==1, by(girl sampleSD)**Then neither TT nor RRuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1collapse HIVtreat noRRnoTT butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs, by(schoolid girl)bys girl noRRnoTT : egen Nschools=count(schoolid)bys girl noRRnoTT: egen Ntotalobs=sum(Nobs)collapse (mean) clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Ntotalobs Nschools HIVtreat if noRRnoTT==1, by(girl sampleSD)***NB: to find the differences between these groups, need to generate a dummy variable use "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1gen TTvnone = .replace TTvnone = 0 if noRRnoTT==1replace TTvnone = 1 if TTnoRR==1***Difference between groups - GIRLcollapse TTvnone HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize TTvnoneforeach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' TTvnone if girl==1 }***Difference between groups - BOYuse "/Users/apple/Dropbox/2001/Dupas replication/datasets/SDcontrolcohort_rev2.dta", cleargen RRWithoutTT=1 if sampleSD==1 & HIVtreat==0gen RRconTT=1 if sampleSD==1 & HIVtreat==1gen RRandTT=1 if sampleSD==1 & HIVtreat==1gen noRRnoTT=1 if sampleSD==0 & HIVtreat==0gen TTnoRR=1 if sampleSD==0 & HIVtreat==1sort sampleSD HIVtreat noRRnoTTgen TTvnone = .replace TTvnone = 0 if noRRnoTT==1replace TTvnone = 1 if TTnoRR==1collapse TTvnone HIVtreat butere bungoma sampleSD clsize girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 Nobs , by(schoolid girl)xi: reg clsize TTvnoneforeach var of varlist girl8perboy8 teacherperpupil fempermaleteacher kcpe2003 repeat8 secschool training athome married fertafter12 {	reg `var' TTvnone if girl==0 }